// import React from 'react'
import { Button, Space, Form } from "antd";

interface IProps {
  submit: () => void;
  reset: () => void;
  form: any;
  initialValues?: any;
  children?: React.ReactNode;
}

function SearchForm(props: IProps) {
  return (
    <>
      <Form
        className="search-form"
        layout="inline"
        form={props.form}
        initialValues={props.initialValues}
      >
        {props.children}
        <Form.Item>
          <Space>
            <Button type="primary" className="mr10" onClick={props.submit}>
              查询
            </Button>
            <Button type="primary" onClick={props.reset}>
              重置
            </Button>
          </Space>
        </Form.Item>
      </Form>
    </>
  );
}

export default SearchForm;
